/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package clientserver_test_tim;

import java.io.Serializable;

/**
 *
 * @author timbeer
 */
public class Person implements Serializable {

    private String vorname;
    private String nachname;
    private int alter;

    
    public Person(String vorname, String nachname, int alter){
        this.vorname = vorname;
        this.nachname = nachname;
        this.alter = alter;
    }
    
     public Person(){
        vorname = "";
        nachname ="";
        alter = 0;
     }
    
    
    @Override
    public String toString(){
        return vorname + " " + nachname + " ist " + alter + " Jahre alt.";
    }
    
    public String drucken() {
        return "Vorname: " + getVorname() + "Nachname: " + getNachname() + "Alter: " + getAlter();
    }

    /**
     * @return the vorname
     */
    public String getVorname() {
        return vorname;
    }

    /**
     * @param vorname the vorname to set
     */
    public void setVorname(String vorname) {
        this.vorname = vorname;
    }

    /**
     * @return the nachname
     */
    public String getNachname() {
        return nachname;
    }

    /**
     * @param nachname the nachname to set
     */
    public void setNachname(String nachname) {
        this.nachname = nachname;
    }

    /**
     * @return the alter
     */
    public int getAlter() {
        return alter;
    }

    /**
     * @param alter the alter to set
     */
    public void setAlter(int alter) {
        this.alter = alter;
    }
}
